<template>
  <div id="salesetlist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">
                <el-table-column label="手机号"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row. telphone }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="操作" align='center' width="400px" fixed="right">
                    <template slot-scope="scope"> 
                        <el-button size="mini"  type="primary"  plain  @click="delect_but(scope.row)">删除</el-button>  
                    </template>
                </el-table-column>
            </el-table>  


   </div>
</template>

<script>

export default {
   name: 'salesetlist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 293
  },
  mounted (){
    
  },
  methods: {
    
   delect_but(row){
      this.$confirm('此操作将删除, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
         }).then(() => {
            this.post("/onsale_privilege/delete", {
                    id:row.id,
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    }else {
                    this.open1(res.message,'warning')
                }

             })
        }).catch(() => {
        //   this.$message({
        //     type: 'info',
        //     message: '已取消解冻'
        //   });          
        });
   }

  }
}
</script>


<style scoped>

</style>